<template>
	<view>
		<stop isBack>
			<view slot="content">审批上传</view>
		</stop>
		<view class="">
			<!-- <stab :names="['']"></stab> -->
		</view>
		<view>
			<sentity model="ProjectPointType" placeholder="请选择审批类型" keyname="name" label="类型"
			v-model="type"></sentity>
		</view>
		<view class="mart3">
			<sentity model="Project" placeholder="请选择项目" keyname="name" label="项目"
			:condtion="cond" v-model="project"></sentity>
		</view>
		<!-- <view>{{project}}</view> -->
		<view class="mart3">
			<sfiles label="选择资料" v-model="files" placeholder=""></sfiles>
		</view>
		<view class="mart3">
			<stextarea label="备注" v-model="tips" placeholder="请填写备注"></stextarea>
		</view>
		<view class="bcf pad3 mart3">
			<view class="cu-btn lg bg-green tac w100 round" @click="submit">
				确认
				<ripple></ripple>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cond:{_option:['my']},
				
				type:'',
				project:'',
				files:[],
				tips:''
			}
		},
		methods: {
			submit(){
				this.$api.post("/ez/api/ProjectPoint",{
					project:'/api_/projects/' + this.project,
					upFiles:this.files,
					tips:this.tips,
					type:'/api_/project_point_types/' + this.type
				},res=>{
					this.log(res)
					this.$com.showToast(res.i)
				})
			}
		}
	}
</script>

<style>

</style>
